1. Field of the Invention
The present invention is directed to apparatus and methods for maintaining computer software objects, and in particular is directed to a system based on object-oriented concepts using objects to represent system components and processes to be applied to those components.
2. Background and Prior Art
Software systems are constructed by creating a number of source code programs that are compiled and linked together to form an executable system. Software maintenance is the process of changing and adapting software to correct errors, or to enhance or change function. Software maintenance includes assuring that the executable software system (the execution version) contains all modifications that have been made to the component source programs. Execution version currency can be assured by recompiling and relinking all components of a software system each time one of the source programs is changed. However as the size of software systems has grown this technique becomes increasingly impractical.
Large software systems, such as operating systems software, and significant application programs, may be comprised of hundreds, thousands, or tens of thousands of separate source code programs. These source code programs are interrelated in a manner specified by the software system architecture designer. The interrelationship of the pieces of a software system can be represented as a hierarchical dependency graph. For example, in FIG. 1, the software system called "topone" is based upon three components, first.o, second.o, and third.o. Each of these, in turn, is dependent upon other programs, e.g. first.o is dependent upon first.c and first.h.
The dependency network for a software system typically identifies source program modules and intermediate components which are eventually assembled to create the finished software system. The generation of intermediate modules and the final system product is carried out by defined executable processes. The most frequently employed function is compilation, which transforms a source code program into an object code module containing machine language instructions necessary to carry out the steps defined in the source code. For example, the object module in FIG. 1 entitled first.o is created by compiling first.c together with first.h. (This example is based on programs coded in the C language, however, the principles are extensible to any compiled or interpreted language such as FORTRAN, PASCAL, ADA, or to assembly language.) The second frequently used process is the binding or link editing of object code files to form an executable module. The binding step includes the process necessary to interrelate object code so that references to variables, memory locations, and other factors are fully resolved so the resulting module can be loaded into a computer system and executed.
It is desirable in large software systems to perform compilation, binding, and other processes only to the extent required by changes to the source programs or to the software architecture definition defining the relationships between the programs. An attempt to manually perform only the necessary processes is subject to error and omission as the size of software systems grow. Automated tools for software maintenance have been developed to automatically determine the necessary changes and execute the required processes. One such tool is the "make" utility found in UNIX-based systems (UNIX is a trademark of UNIX Systems Laboratories).
Make uses an acyclic dependency graph specified in a computer file (known as a Makefile). Each node in the graph has a Make rule which is executed to produce a new version of the parent node if any child node has changed.
The Make utility, while capable of performing software maintenance, suffers from a lack of flexibility and difficulty of use. A large software system would require the specification of a large number of rules. The dependencies and interrelationships of the modules in a Make file is implicit rather than explicit leading to difficulties in interpretation and checking of the files. This leads to difficulties in maintaining the Make file when changes are made to the software architecture and interrelationship.
A discussion of several other techniques and proposed alternatives is provided in U.S. Pat. No. 4,558,413 to Schmidt et al. The Schmidt et al. system is designed to assemble a software system based upon source programs located in a series of workstation on a local area network. The Schmidt et al. system provides an extension to the Make utility which is claimed to provide more efficient management of large software products in a distributed environment. Schmidt et al., however, still require the specification of the complete architecture (system model) in a descriptor file.
Object-oriented software systems and object-oriented programming languages are being increasingly applied to the solution of large system software problems. Object-oriented approaches are directed to the subdivision of a problem to smaller, more easily managed pieces. Object-oriented languages and systems encourage programming and development in terms of "objects". Objects implement encapsulation by providing a single definition of the data and processes (known as methods) necessary to manage that object.
A second feature of object-oriented languages systems is the notion of inheritance. Inheritance allows one object to "inherit" or use the data or methods from another object. In this way, new, more specific objects can be defined by defining only the variances from a more general object definition.
Encapsulation of objects requires that object data be manipulated or viewed by the use of one of the object methods. Each object is provided a set of operations providing a visible interface to other objects. Communication between objects is accomplished by message passing where messages conforming to the visible interface specification are accepted and processed by that interface. A message passed to an object is analyzed by the object which itself selects a method by which it will react to that message.
Object-oriented concepts allow significant reusability of objects through the concept of instantiation. Instantiation allows a copy or instance of an object to be created from either a generic object description or another object using the principles of inheritance. The particular instance of the object has its own data and is permitted to override particular data in the generic object definition.
Inheritance allows an object instance to benefit from hidden data or methods in one or more superior objects. An object which inherits data or methods for more than one object is said to have multiple inheritance. Encapsulation of an object can be shown as in FIG. 2. Here an object designated 100 contains the data description 110 and functions 112 and 114. The object reacts in response to message 116 which causes a selection of one of the methods 112 or 114 for execution.
FIG. 3 illustrates the concept of multiple inheritance. Two objects A and B can be defined at 120, 122 respectively. Object C 124 is shown as inheriting the data and functions from each of the objects A and B and can have its own additional data and methods. Object C is said to be multiply dependent on objects A and B.
The object-oriented approach provides an important way to subdivide a large problem such as large software system maintenance. The concepts of encapsulation and inheritance provide a powerful tool for solving such large problems.